package com.atguigu07.encapsulation.exer2;

/**
 * ClassName: book
 * Description:
 *案例：自定义图书类
 *
 * 设定属性包括：
 * 书名bookName，
 * 作者author，
 * 价格price；
 *
 * 方法包括：
 * 相应属性的get/set方法，
 * 图书信息介绍等。
 * @Author liu
 * @Create 2024/8/26 15:33
 * @Version 1.0
 */

public class book {
    private String bookName;
    private String author;
    private double price;

    public void getbookName(String name){
        bookName = name;
    }
    public String setbookName(){
        return bookName;
    }
    public void getAuthor(String aut){
         author = aut;
    }
    public String setAuthor(){
        return author;
    }
    public void getprice(double pri){
        price = pri;
    }
    public double setprice(){
        return price;
    }
    public String showInfo() {
        return "bookName : " + bookName +
                ", author : " + author + ", price : " + price;
    }

}
